package com.ziyueyuwen.xiniao.bean.question;

import com.ziyueyuwen.xiniao.bean.question.ZyQuestionPoint;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author wancheng  on 2019/1/16.
 */
public class PointDO extends ZyQuestionPoint {

    private List<PointDO> children;


    public PointDO(Integer id,String name, Integer level, Integer parent, Date createTime) {
        super(id,name,level,parent,createTime);
    }
    public PointDO addChildren(PointDO bean){
        if (this.children == null){
            children = new ArrayList<>();
        }
        this.children.add(bean);
        return this;
    }
    public List<PointDO> getChildren() {
        return children;
    }
    public void setChildren(List<PointDO> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "PointDO{" +
                "children=" + children +
                '}';
    }
}
